from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^sourenfe/', include('sourenfe.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # (r'^admin/', include(admin.site.urls)),
    (r'^souren/$', 'sourenfe.controller.index'),
    (r'^souren/(?P<adv>adv)/$', 'sourenfe.controller.index'),
    (r'^souren/(?P<type>about|help|contact)/$', 'sourenfe.controller.plain'),
    (r'^souren/feedback/$', 'sourenfe.controller.feedback'),

    (r'^souren/searchname/(?P<type>\w{1,20})/(?P<name>\w{1,128})/$', 'sourenfe.controller.searchname'),
    (r'^souren/searchname/(?P<type>\w{1,20})/(?P<name>\w{1,128})/p(?P<pagenum>\d{1,5})', 'sourenfe.controller.searchname'),

    (r'^souren/search/(?P<type>\w{1,20})/(?P<query>[\w| |\t]{1,1024})/$', 'sourenfe.controller.search'),
    (r'^souren/search/(?P<type>\w{1,20})/(?P<query>[\w| |\t]{1,1024})/p(?P<pagenum>\d{1,5})/c(?P<clickseq>\d{1,5})/', 'sourenfe.controller.search'),
    (r'^souren/search/(?P<type>\w{1,20})/(?P<query>[\w| |\t]{1,1024})/(?P<sex>\d{1,2})/(?P<age>\d{1,2})/(?P<province>\d{1,2})/(?P<city>\d{1,2})/(?P<marriage>\d{1,2})/$', 'sourenfe.controller.search'),
    (r'^souren/search/(?P<type>\w{1,20})/(?P<query>[\w| |\t]{1,1024})/(?P<sex>\d{1,2})/(?P<age>\d{1,2})/(?P<province>\d{1,2})/(?P<city>\d{1,2})/(?P<marriage>\d{1,2})/p(?P<pagenum>\d{1,5})/c(?P<clickseq>\d{1,5})/', 'sourenfe.controller.search'),

    (r'^souren/detail/(?P<type>\w{1,20})/(?P<id>\w{1,128})/$', 'sourenfe.controller.detail'),
    (r'^souren/detail/(?P<type>\w{1,20})/(?P<id>\w{1,128})/(?P<ks>[\w| |\t]{1,1024})/(?P<rank>\d{1,5})/(?P<clickseq>\d{1,5})/$', 'sourenfe.controller.detail'),
    (r'^souren/article/(?P<type>\w{1,20})/(?P<uid>\w{1,128})/(?P<blogid>\w{1,128})/', 'sourenfe.controller.article'),
)
